/** <a href="http://www.cpupk.com/decompiler">Eclipse Class Decompiler</a> plugin, Copyright (c) 2017 Chen Chao. **/
package com.minierp.dao.hibernate;

import com.minierp.dao.EnterpriseInfoDao;
import com.minierp.model.EnterpriseInfo;
import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class EnterpriseInfoDaoImpl extends HibernateDaoSupport
		implements
			EnterpriseInfoDao {
	public EnterpriseInfo get() {
		String sql = "from com.minierp.model.EnterpriseInfo ei order by ei.id desc";
		List list = this.getHibernateTemplate().find(sql);
		return list.isEmpty() ? null : (EnterpriseInfo) list.get(0);
	}

	public void update(EnterpriseInfo o) {
		this.getHibernateTemplate().update(o);
	}
}